package xin.alum.aim.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import xin.alum.aim.cluster.ClusterPusher;
import xin.alum.aim.model.Pusher;

import java.io.Serializable;


class RedisPusher extends ClusterPusher {

    @Autowired
    @Qualifier("aimRedisTemplate")
    private RedisTemplate<String, Object> redisTemplate;

    protected <T> boolean push(String channel, T d) {
        redisTemplate.convertAndSend(channel, d);
        return true;
    }
}
